package com.yixin.hospital.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum PatientCardStatusEnum {

    PENDING(0, "未开通"),
    VALID(1, "可用"),
    INVALID(2, "不可用"),
            ;

    private Integer code;
    private String desc;


    public static String getDesc(int code) {
        for (PatientCardStatusEnum patientCardStatusEnum : PatientCardStatusEnum.values()) {
            if (patientCardStatusEnum.getCode() == code) {
                return patientCardStatusEnum.getDesc();
            }
        }
        return "";
    }
}
